package com.xiaoxing.salesclient.mvp.ui.adapter;

import android.content.Context;
import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jess.arms.utils.ArmsUtils;
import com.xiaoxing.salesclient.mvp.model.entity.UserCenter;

import java.util.List;

import xiaoxing.com.salesclient.R;


public class GeRenZhongXinHuiZhenShiJianAdapter extends BaseQuickAdapter<UserCenter.DataBean.HistoryBean, BaseViewHolder> {

    private Context mContext;

    public GeRenZhongXinHuiZhenShiJianAdapter(Context context, @Nullable List<UserCenter.DataBean.HistoryBean> data) {
        super(R.layout.item_ge_ren_zhong_xin_hui_zhen_shi_jian, data);
        this.mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, UserCenter.DataBean.HistoryBean item) {

        helper.setText(R.id.tv_shi_jian, ArmsUtils.stampToDate(item.getCreate_time()));
        if (item.getStatus().equals("0")) {

            Glide.with(mContext).load(R.drawable.icon_ge_ren_zhong_cuo).into((ImageView) helper.getView(R.id.img_zhuang_tai));
        } else {
            Glide.with(mContext).load(R.drawable.icon_ge_ren_zhong_dui).into((ImageView) helper.getView(R.id.img_zhuang_tai));
        }

    }

}
